'use strict';

module.exports = app => {
  const { model } = app;
  const { UUID } = app.Sequelize;

  const PermissionResource = model.define(
    'PermissionResource',
    {
      permission_id: {
        type: UUID,
      },
      resource_id: {
        type: UUID,
      },
    },
    {
      tableName: 'sys_permission_resource',
      timestamps: false,
    }
  );

  PermissionResource.removeAttribute('id');
  // PermissionResource.removeAttribute('created_at');
  // PermissionResource.removeAttribute('updated_at');

  return PermissionResource;
};
